using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools
{
    /// <summary>
    /// <para>Overlay Events</para>
    /// <para>Overlays one or more linear event feature layers onto a target network 
    /// and outputs a feature class or table that represents the dynamic segmentation of the inputs.</para>
    /// <para>将一个或多个线性事件要素图层叠加到目标网络上
    /// 并输出表示输入动态分段的要素类或表。</para>
    /// </summary>    
    [DisplayName("Overlay Events")]
    public class OverlayEvents : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public OverlayEvents()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_route_features">
        /// <para>Input Route Features</para>
        /// <para>The target network onto which the event layers will be dynamically segmented.</para>
        /// <para>事件图层将动态分割到的目标网络。</para>
        /// </param>
        /// <param name="_event_layers">
        /// <para>Event Layers</para>
        /// <para>The event layers to be dynamically segmented together onto a target network.</para>
        /// <para>要动态分割到目标网络上的事件层。</para>
        /// </param>
        /// <param name="_output_dataset">
        /// <para>Output Dataset</para>
        /// <para>The table or feature class to be created, containing the output event records.</para>
        /// <para>要创建的表或要素类，包含输出事件记录。</para>
        /// </param>
        public OverlayEvents(object _in_route_features, List<object> _event_layers, object _output_dataset)
        {
            this._in_route_features = _in_route_features;
            this._event_layers = _event_layers;
            this._output_dataset = _output_dataset;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Overlay Events";

        public override string CallName => "locref.OverlayEvents";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_route_features, _event_layers, _output_dataset, _include_geometry.GetGPValue(), _network_fields];

        /// <summary>
        /// <para>Input Route Features</para>
        /// <para>The target network onto which the event layers will be dynamically segmented.</para>
        /// <para>事件图层将动态分割到的目标网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_route_features { get; set; }


        /// <summary>
        /// <para>Event Layers</para>
        /// <para>The event layers to be dynamically segmented together onto a target network.</para>
        /// <para>要动态分割到目标网络上的事件层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Layers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _event_layers { get; set; }


        /// <summary>
        /// <para>Output Dataset</para>
        /// <para>The table or feature class to be created, containing the output event records.</para>
        /// <para>要创建的表或要素类，包含输出事件记录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_dataset { get; set; }


        /// <summary>
        /// <para>Include Geometry</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the Output Dataset will include event geometry.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The Output Dataset will not include event geometry. Event records will be stored as a table. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The Output Dataset will include event geometry. Event records will be stored as a feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出数据集是否包含事件几何图形。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 输出数据集将不包括事件几何。事件记录将存储为表。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 输出数据集将包括事件几何。事件记录将存储为要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Geometry")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_geometry_value _include_geometry { get; set; } = _include_geometry_value._false;

        public enum _include_geometry_value
        {
            /// <summary>
            /// <para>EXCLUDE_GEOMETRY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EXCLUDE_GEOMETRY")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>INCLUDE_GEOMETRY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE_GEOMETRY")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Network Fields</para>
        /// <para>Fields from the network layer that will be included in the output.</para>
        /// <para>网络图层中将包含在输出中的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _network_fields { get; set; } = null;


        public OverlayEvents SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}